1. Field of the Invention
The present invention relates to a microcomputer, and more particularly to a microcomputer having an instruction execution unit and an internal memory formed on the same chip and capable of accessing the internal memory and an external memory.
2. Description of Related Art
Recent advancement of semiconductor device manufacturing technologies has resulted in increase in the integration density of semiconductor devices. This advancement has developed so-called microcomputers from 8 bits to 16 bits, and further to 32 bits. Particularly, increased integration density of the microcomputer has increased the capacity of an internal memory formed together with an instruction execution unit on the same single chip.
On the other hand, the advancement of the semiconductor device manufacturing technologies has also elevated the operation speed of the semiconductor devices. Particularly, the internal memory can be operated at a speed higher than that required for accessing to an external memory, because the internal memory can be accessed without intermediary of an external bus and a bus buffer.
Thus, in order to improve the performance of microcomputers, it has become an ordinary practice to positively utilize an internal memory and set a read/write cycle in such a manner that an internal memory access time is shorter than an external memory access time. For this purpose, for example, a microcomputer is constructed such that an internal bus of the microcomputers is divided into a main bus for transferring data and address to an external memory access, and a sub-bus specially provided for accessing an internal memory, so that an internal memory access can be executed in a short time.
In an instruction execution of microcomputers, however, the memory access time is closely related to the actual time of the instruction execution. Therefore, in the computer constructed as mentioned above, the processing time the execution of instructions with reference to the internal memory is different from the time for the execution of instructions with reference to the external memory. This is true even if the contents of the processings are the same.
On the other hand, in the case of a microcomputer having an internal memory composed of a mask programmable read only memory (ROM), when only a small amount of microcomputers is produced, the system is so constructed that only an external memory is used from the viewpoint of the cost and reliability of the processing program. But, if the computer becomes manufactured in a mass-production manner, a processing program is then relocated to an internal memory to allow reduction of required capacity of an external memory, so that the cost is decreased.
In this circumstance, it is inconvenient that the processing with reference to the internal memory is different in execution time from the processing with reference to the external memory. Particularly, this problem is very significant in the field of application such as a motor control in which a real time processing has to be precisely executed.